

<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('短链信息')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Orginal_url')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-orginal_url" data-rule="required" class="form-control" name="row[orginal_url]" type="text" value="{$row.orginal_url|htmlentities}">-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group" data-type="menu">
        <label for="remark" class="control-label col-xs-12 col-sm-2">{:__('轮询类型')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[type]', $lxTypeList, $row['type'])}
            <div style="color:red;">
                <ul style="padding-left: 20px;">
                    <li>单用户轮询:针对单一用户来做循环调整</li>
                    <li>固定轮询:针对用户只做一遍循环，后面都跳转第一个</li>
                    <li>总用户轮询:针对访问次数做循环跳转</li>
                </ul>
            </div>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Orginal_url')}:</label>
        <div class="col-xs-12 col-sm-8">

            <table class="table fieldlist" data-name="row[orginal_url]" data-template="row[orginal_url]tpl">
                <tr>
                    <td>{:__('链接地址')}</td>
                    <td width="90">{:__('Operate')}</td>
                </tr>
                <tr><td colspan="5">
                    <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a>
                    <textarea name="row[orginal_url]" class="form-control hide" cols="30" rows="5">{$row.orginal_url|htmlentities}</textarea>
                </td></tr>
            </table>
            <script type="text/html" id="row[orginal_url]tpl">
                <tr>
                    <td><input type="text" name="<%=name%>[<%=index%>][value]" class="form-control" value="<%=row.value%>"/></td>
                    <td width="90">
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                    </td>
                </tr>
            </script>
            <span style="color: red">地址必须携带https://或http://</span>
        </div>
    </div>




    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Group_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-group_id" data-rule="required" data-source="short/chain/group/selectpage"  data-multiple="true" class="form-control selectpage" name="row[group_id]" type="text" value="{$row.group_id|htmlentities}">
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Domain')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select  id="c-domain_id" data-rule="required" class="form-control selectpicker" name="row[domain_id]">
                {foreach name="domain_list" item="vo"}
                <option value="{$key}" {in name="key" value="$row.domain_id"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('唯一码')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-key" data-rule="required" class="form-control" name="row[key]" type="text" value="{$row.key|htmlentities}">
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Short_url')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-short_url" readonly data-rule="required" class="form-control" name="row[short_url]" type="text" value="{$row.short_url|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('状态')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input  id="c-status" name="row[status]" type="hidden" value="1" >
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-status" data-yes="1" data-no="0" >
                <i class="fa fa-toggle-on text-success fa-2x"></i>
            </a>
        </div>
    </div>



    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>



